import QtQuick 1.0

MouseArea {
    id: menu

    anchors.centerIn: parent
    width: screen.width
    height: screen.height
    onClicked: {
        if (!dead)
            resume();
    }

    Rectangle {
        anchors.fill: parent
        color: "black"
        opacity: 0.4
    }

    Column {
        id: selections

        property int selectionHeight: (parent.height - 5*selections.spacing)/4

        anchors.centerIn: parent
        spacing: 10

        Button {
            opacity: !dead
            anchors.horizontalCenter: parent.horizontalCenter
            name: "resume"
            onClicked: resume();
        }
        Button {
            anchors.horizontalCenter: parent.horizontalCenter
            name: "newGame"
            onClicked: newGame();
        }
        Button {
            name: "highScores"
            onClicked: {
                menu.opacity = 0;
                loader.source = "HighScores.qml"
            }
        }
        Button {
            anchors.horizontalCenter: parent.horizontalCenter
            name: "exit"
            onClicked: Qt.quit();
        }
    }


    Button {
        id: infoButton

        //width: 0.5*height
        //height: 0.08*parent.height
        name: "info"
        anchors {
            top: parent.top
            topMargin: -parent.height*0.05
            right: parent.right
            rightMargin: 2*anchors.topMargin
        }

        onClicked: {
            loader.source = "InfoView.qml"
            menu.opacity = 0;
        }
    }
}
